<%@page import="com.zhiyou.bbs01.Title"%>
<%@page import="com.zhiyou.bbs01.C3P0_util"%>
<%@page import="com.zhiyou.bbs01.User"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="com.zhiyou.bbs01.UserDao"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>明星用户</title>
<link rel="stylesheet" type="text/css" href="/bbs/css/register.css"/>
</head>
<body>
	<%
		UserDao ud = new UserDao();//创建用户dao层对象
		C3P0_util c3p0 = ud.selectDesc("tab_user", "uscore");//调用查询排序方法 获取结果集
		ArrayList<User> list = ud.processData("User", c3p0);//调用处理结果集方法  传入对象类型 与结果集
		int i =1;
	%>

	<table class="All_table">
		<caption><font color="red" size="5px">明星用户</font></caption>
	 <tr>
	 	<th class="All_th_td">名次</th><th class="All_th_td">用户</th><th class="All_th_td">积分</th>
	 </tr>
	<%	for (User u : list) { 
		%>
			<tr>
				<th class="All_th_td"><%=i %></th><th class="All_th_td"><a href="/bbs/userTitle_servlet?uid=<%=String.valueOf(u.getUid()) %>" > <%=u.getUname() %></a> </th><td class="All_th_td"><%=u.getUscore() %></td>
			</tr>
	<% i++; } %>
	</table>
</body>
</html>